// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_hm_accounts
// * CreateDate    : 2014-06-05 18:29:54
// * Creater       : CodeSmith
// * LastChangeDate: 2014-06-05 18:29:54
// * LastChanger   : 2014-06-05 18:29:54
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;
using ESOL.Common;

namespace ESOL.Common.Entity
{
    [DataContract]
	[Serializable]
	public partial class HmAccountsEntity : EntityBase
    {
        public HmAccountsTable TableSchema
        {
            get
            {
                return HmAccountsTable.Current;
            }
		}
		
		public HmAccountsEntity()
        {

        }
		
		public HmAccountsEntity(DataRow dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Accountid = Convert.ToInt32(CommonFunctions.ToObject(dr["accountid"]));
			this.Accountdomainid = Convert.ToInt32(CommonFunctions.ToObject(dr["accountdomainid"]));
			this.Accountadminlevel = Convert.ToByte(CommonFunctions.ToObject(dr["accountadminlevel"]));
			this.Accountaddress = Convert.ToString(CommonFunctions.ToObject(dr["accountaddress"]));
			this.Accountpassword = Convert.ToString(CommonFunctions.ToObject(dr["accountpassword"]));
			this.Accountactive = Convert.ToInt32(CommonFunctions.ToObject(dr["accountactive"]));
			this.Accountisad = Convert.ToInt32(CommonFunctions.ToObject(dr["accountisad"]));
			this.Accountaddomain = Convert.ToString(CommonFunctions.ToObject(dr["accountaddomain"]));
			this.Accountadusername = Convert.ToString(CommonFunctions.ToObject(dr["accountadusername"]));
			this.Accountmaxsize = Convert.ToInt32(CommonFunctions.ToObject(dr["accountmaxsize"]));
			this.Accountvacationmessageon = Convert.ToByte(CommonFunctions.ToObject(dr["accountvacationmessageon"]));
			this.Accountvacationmessage = Convert.ToString(CommonFunctions.ToObject(dr["accountvacationmessage"]));
			this.Accountvacationsubject = Convert.ToString(CommonFunctions.ToObject(dr["accountvacationsubject"]));
			this.Accountpwencryption = Convert.ToByte(CommonFunctions.ToObject(dr["accountpwencryption"]));
			this.Accountforwardenabled = Convert.ToByte(CommonFunctions.ToObject(dr["accountforwardenabled"]));
			this.Accountforwardaddress = Convert.ToString(CommonFunctions.ToObject(dr["accountforwardaddress"]));
			this.Accountforwardkeeporiginal = Convert.ToByte(CommonFunctions.ToObject(dr["accountforwardkeeporiginal"]));
			this.Accountenablesignature = Convert.ToByte(CommonFunctions.ToObject(dr["accountenablesignature"]));
			this.Accountsignatureplaintext = Convert.ToString(CommonFunctions.ToObject(dr["accountsignatureplaintext"]));
			this.Accountsignaturehtml = Convert.ToString(CommonFunctions.ToObject(dr["accountsignaturehtml"]));
			this.Accountlastlogontime = Convert.ToDateTime(CommonFunctions.ToObject(dr["accountlastlogontime"]));
			this.Accountvacationexpires = Convert.ToByte(CommonFunctions.ToObject(dr["accountvacationexpires"]));
			this.Accountvacationexpiredate = Convert.ToDateTime(CommonFunctions.ToObject(dr["accountvacationexpiredate"]));
			this.Accountpersonfirstname = Convert.ToString(CommonFunctions.ToObject(dr["accountpersonfirstname"]));
			this.Accountpersonlastname = Convert.ToString(CommonFunctions.ToObject(dr["accountpersonlastname"]));
        }
		
		public HmAccountsEntity(DataRowView dr)
        {
			if(dr == null)
			{
				return;
			}
			this.Accountid = Convert.ToInt32(CommonFunctions.ToObject(dr["accountid"]));
			this.Accountdomainid = Convert.ToInt32(CommonFunctions.ToObject(dr["accountdomainid"]));
			this.Accountadminlevel = Convert.ToByte(CommonFunctions.ToObject(dr["accountadminlevel"]));
			this.Accountaddress = Convert.ToString(CommonFunctions.ToObject(dr["accountaddress"]));
			this.Accountpassword = Convert.ToString(CommonFunctions.ToObject(dr["accountpassword"]));
			this.Accountactive = Convert.ToInt32(CommonFunctions.ToObject(dr["accountactive"]));
			this.Accountisad = Convert.ToInt32(CommonFunctions.ToObject(dr["accountisad"]));
			this.Accountaddomain = Convert.ToString(CommonFunctions.ToObject(dr["accountaddomain"]));
			this.Accountadusername = Convert.ToString(CommonFunctions.ToObject(dr["accountadusername"]));
			this.Accountmaxsize = Convert.ToInt32(CommonFunctions.ToObject(dr["accountmaxsize"]));
			this.Accountvacationmessageon = Convert.ToByte(CommonFunctions.ToObject(dr["accountvacationmessageon"]));
			this.Accountvacationmessage = Convert.ToString(CommonFunctions.ToObject(dr["accountvacationmessage"]));
			this.Accountvacationsubject = Convert.ToString(CommonFunctions.ToObject(dr["accountvacationsubject"]));
			this.Accountpwencryption = Convert.ToByte(CommonFunctions.ToObject(dr["accountpwencryption"]));
			this.Accountforwardenabled = Convert.ToByte(CommonFunctions.ToObject(dr["accountforwardenabled"]));
			this.Accountforwardaddress = Convert.ToString(CommonFunctions.ToObject(dr["accountforwardaddress"]));
			this.Accountforwardkeeporiginal = Convert.ToByte(CommonFunctions.ToObject(dr["accountforwardkeeporiginal"]));
			this.Accountenablesignature = Convert.ToByte(CommonFunctions.ToObject(dr["accountenablesignature"]));
			this.Accountsignatureplaintext = Convert.ToString(CommonFunctions.ToObject(dr["accountsignatureplaintext"]));
			this.Accountsignaturehtml = Convert.ToString(CommonFunctions.ToObject(dr["accountsignaturehtml"]));
			this.Accountlastlogontime = Convert.ToDateTime(CommonFunctions.ToObject(dr["accountlastlogontime"]));
			this.Accountvacationexpires = Convert.ToByte(CommonFunctions.ToObject(dr["accountvacationexpires"]));
			this.Accountvacationexpiredate = Convert.ToDateTime(CommonFunctions.ToObject(dr["accountvacationexpiredate"]));
			this.Accountpersonfirstname = Convert.ToString(CommonFunctions.ToObject(dr["accountpersonfirstname"]));
			this.Accountpersonlastname = Convert.ToString(CommonFunctions.ToObject(dr["accountpersonlastname"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return HmAccountsTable.Current;
            }
        }
		
		#region Perporty List
        [DataMember]
        public int Accountid
        {
            get { return Convert.ToInt32(GetData(HmAccountsTable.C_accountid)); }
            set { SetData(HmAccountsTable.C_accountid, value); }
        }
		
        [DataMember]
        public int Accountdomainid
        {
            get { return Convert.ToInt32(GetData(HmAccountsTable.C_accountdomainid)); }
            set { SetData(HmAccountsTable.C_accountdomainid, value); }
        }
		
        [DataMember]
        public byte Accountadminlevel
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountadminlevel)); }
            set { SetData(HmAccountsTable.C_accountadminlevel, value); }
        }
		
        [DataMember]
        public string Accountaddress
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountaddress)); }
            set { SetData(HmAccountsTable.C_accountaddress, value); }
        }
		
        [DataMember]
        public string Accountpassword
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountpassword)); }
            set { SetData(HmAccountsTable.C_accountpassword, value); }
        }
		
        [DataMember]
        public int Accountactive
        {
            get { return Convert.ToInt32(GetData(HmAccountsTable.C_accountactive)); }
            set { SetData(HmAccountsTable.C_accountactive, value); }
        }
		
        [DataMember]
        public int Accountisad
        {
            get { return Convert.ToInt32(GetData(HmAccountsTable.C_accountisad)); }
            set { SetData(HmAccountsTable.C_accountisad, value); }
        }
		
        [DataMember]
        public string Accountaddomain
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountaddomain)); }
            set { SetData(HmAccountsTable.C_accountaddomain, value); }
        }
		
        [DataMember]
        public string Accountadusername
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountadusername)); }
            set { SetData(HmAccountsTable.C_accountadusername, value); }
        }
		
        [DataMember]
        public int Accountmaxsize
        {
            get { return Convert.ToInt32(GetData(HmAccountsTable.C_accountmaxsize)); }
            set { SetData(HmAccountsTable.C_accountmaxsize, value); }
        }
		
        [DataMember]
        public byte Accountvacationmessageon
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountvacationmessageon)); }
            set { SetData(HmAccountsTable.C_accountvacationmessageon, value); }
        }
		
        [DataMember]
        public string Accountvacationmessage
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountvacationmessage)); }
            set { SetData(HmAccountsTable.C_accountvacationmessage, value); }
        }
		
        [DataMember]
        public string Accountvacationsubject
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountvacationsubject)); }
            set { SetData(HmAccountsTable.C_accountvacationsubject, value); }
        }
		
        [DataMember]
        public byte Accountpwencryption
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountpwencryption)); }
            set { SetData(HmAccountsTable.C_accountpwencryption, value); }
        }
		
        [DataMember]
        public byte Accountforwardenabled
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountforwardenabled)); }
            set { SetData(HmAccountsTable.C_accountforwardenabled, value); }
        }
		
        [DataMember]
        public string Accountforwardaddress
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountforwardaddress)); }
            set { SetData(HmAccountsTable.C_accountforwardaddress, value); }
        }
		
        [DataMember]
        public byte Accountforwardkeeporiginal
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountforwardkeeporiginal)); }
            set { SetData(HmAccountsTable.C_accountforwardkeeporiginal, value); }
        }
		
        [DataMember]
        public byte Accountenablesignature
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountenablesignature)); }
            set { SetData(HmAccountsTable.C_accountenablesignature, value); }
        }
		
        [DataMember]
        public string Accountsignatureplaintext
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountsignatureplaintext)); }
            set { SetData(HmAccountsTable.C_accountsignatureplaintext, value); }
        }
		
        [DataMember]
        public string Accountsignaturehtml
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountsignaturehtml)); }
            set { SetData(HmAccountsTable.C_accountsignaturehtml, value); }
        }
		
        [DataMember]
        public DateTime Accountlastlogontime
        {
            get { return Convert.ToDateTime(GetData(HmAccountsTable.C_accountlastlogontime)); }
            set { SetData(HmAccountsTable.C_accountlastlogontime, value); }
        }
		
        [DataMember]
        public byte Accountvacationexpires
        {
            get { return Convert.ToByte(GetData(HmAccountsTable.C_accountvacationexpires)); }
            set { SetData(HmAccountsTable.C_accountvacationexpires, value); }
        }
		
        [DataMember]
        public DateTime Accountvacationexpiredate
        {
            get { return Convert.ToDateTime(GetData(HmAccountsTable.C_accountvacationexpiredate)); }
            set { SetData(HmAccountsTable.C_accountvacationexpiredate, value); }
        }
		
        [DataMember]
        public string Accountpersonfirstname
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountpersonfirstname)); }
            set { SetData(HmAccountsTable.C_accountpersonfirstname, value); }
        }
		
        [DataMember]
        public string Accountpersonlastname
        {
            get { return Convert.ToString(GetData(HmAccountsTable.C_accountpersonlastname)); }
            set { SetData(HmAccountsTable.C_accountpersonlastname, value); }
        }
		
		#endregion
	}
	
	
}	

